package computer;

/*
 * 计算机类
 */

public class Computer {
	// CPU
	private CPU cpu;
	// 内存
	private EMS ems;
	// 硬盘
	private HardDisk hardDisk;

	public CPU getCpu() {
		return cpu;
	}

	public void setCpu(CPU cpu) {
		this.cpu = cpu;
	}

	public EMS getEms() {
		return ems;
	}

	public void setEms(EMS ems) {
		this.ems = ems;
	}

	public HardDisk getHardDisk() {
		return hardDisk;
	}

	public void setHardDisk(HardDisk hardDisk) {
		this.hardDisk = hardDisk;
	}
	
	// 输出计算机信息
	public void printInfo() {
		System.out.println("计算机的信息如下：");
		System.out.println("CPU的品牌是：" + cpu.getBrand() + ",主频是：" + cpu.getBasicFrequency());
		System.out.println("硬盘容量是：" + hardDisk.getCapacity());
		System.out.println("内存类型是：" + ems.getType() + ",内存容量是：" + ems.getCapacity());
	}
}
